<!doctype html>
<html>

	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<title>会员登录</title>
		<link rel="stylesheet" href="css/bootstrap.min.css" type="text/css" />
		<script src="js/jquery-1.11.3.min.js" type="text/javascript"></script>
		<script src="js/bootstrap.min.js" type="text/javascript"></script>
		<!-- 引入自定义css文件 style.css -->
		<link rel="stylesheet" href="css/style.css" type="text/css" />

		<style>
			body {
				margin-top: 20px;
				margin: 0 auto;
				width: 100%;
			}
			
			.carousel-inner .item img {
				width: 100%;
				height: 300px;
			}
			
			.disabled {}
		</style>
	</head>

	<body>

		<!--
            	时间：2015-12-30
            	描述：导航条
            -->
		<div id="header"></div>

		<div id="paging" class="row" style="width:1210px;margin:0 auto;">
			<div class="col-md-12">
				<ol class="breadcrumb">
					<li>
						<a href="index.html">首页</a>
					</li>
				</ol>
			</div>

			<div v-for="(p, i) in productList" :key="p.id" class="col-md-2">
				<a :href="'product_info.htm?pid='+p.pid"><img v-bind:src="path+p.pimage" width="170" height="170" style="display: inlineblock;"></a>
				<p>
					<a :href="'product_info.htm?pid='+p.pid" style="color:green;font-size: 12px;">{{p.pname}}</a>
				</p>
				<p>
					<font color="#FF0000">商城价： &yen;{{p.shopPrice}}</font>
				</p>

			</div>

			
			<!--分页 -->
			<div style="width:380px;margin:0 auto;margin-top:50px;">
				<ul class="pagination" style="text-align:center; margin-top:10px;">
					<li v-bind:class="{'disabled': currPage==1}">
						<a v-bind:href="'product_list.htm?Page='+(currPage-1)+'&cid='+cid" aria-label="Previous"><span aria-hidden="true">&laquo;</span></a>
					</li>
					<li v-for="n in totalPage" v-bind:class="{'active': currPage == n}">
						<a v-bind:href="'product_list.htm?Page='+n+'&cid='+cid">{{n}}</a>
					</li>
					<li v-bind:class="{'disabled': currPage==totalPage}">
						<a :href="'product_list.htm?Page='+(currPage+1)+'&cid='+cid" aria-label="Next">
							<span aria-hidden="true">&raquo;</span>
						</a>
					</li>
				</ul>
			</div>
			<!-- 分页结束=======================        -->
		</div>
		<!--
       		商品浏览记录:
        -->
		<div style="width:1210px;margin:0 auto; padding: 0 9px;border: 1px solid #ddd;border-top: 2px solid #999;height: 246px;">

			<h4 style="width: 50%;float: left;font: 14px/30px " 微软雅黑 ";">浏览记录</h4>
			<div style="width: 50%;float: right;text-align: right;">
				<a href="">more</a>
			</div>
			<div style="clear: both;"></div>

			<div style="overflow: hidden;">

				<ul style="list-style: none;">
					<li style="width: 150px;height: 216;float: left;margin: 0 8px 0 0;padding: 0 18px 15px;text-align: center;"><img src="products/1/cs10001.jpg" width="130px" height="130px" /></li>
				</ul>

			</div>
		</div>
		<div style="margin-top:50px;">
			<img src="./image/footer.jpg" width="100%" height="78" alt="我们的优势" title="我们的优势" />
		</div>

		<div style="text-align: center;margin-top: 5px;">
			<ul class="list-inline">
				<li>
					<a>关于我们</a>
				</li>
				<li>
					<a>联系我们</a>
				</li>
				<li>
					<a>招贤纳士</a>
				</li>
				<li>
					<a>法律声明</a>
				</li>
				<li>
					<a>友情链接</a>
				</li>
				<li>
					<a target="_blank">支付方式</a>
				</li>
				<li>
					<a target="_blank">配送方式</a>
				</li>
				<li>
					<a>服务声明</a>
				</li>
				<li>
					<a>广告声明</a>
				</li>
			</ul>
		</div>
		<div style="text-align: center;margin-top: 5px;margin-bottom:20px;">
			Copyright &copy; 2005-2016 天虎商城 版权所有
		</div>

	</body>
	<script type="text/javascript" src="js/vue.js"></script>
	<script type="text/javascript" src="js/axios.min.js"></script>
	<script type="text/javascript" src="js/header.js"></script>
	<script>
		var findPageByCid = path + ''
		var page = $.getUrlParam('Page');
		var cid = $.getUrlParam('cid');
		var paging = new Vue({
			el: "#paging",
			data: {
				page: null,
				productList: null,
				currPage:1,
				totalPage:null,
				'cid':cid,
			},
			methods: {

			},
			mounted: function() {
				var data = {
					'cid': cid,
					'page': page,
				}
				axios({
					url: "/ShopManagement/product/findPageByCid",
					method: "get",
					params: data,
				}).then(function(response) {
					
					paging.page = response.data;
					paging.productList = paging.page.list;
					paging.totalPage=paging.page.totalPage;
					paging.currPage=paging.page.currPage;
					
				}).catch(function(reason) {
					console.log("请求失败");
				});

			}
		});
	</script>

</html>